package com.wuchengdong.web.extend.utils;

import jakarta.servlet.http.Cookie;

public class CookieUtil {
    public static Cookie getByName(Cookie[] cookies, String name){
        if (cookies == null) return null;
        for (Cookie cookie : cookies) {
            if(cookie.getName().equals(name)){
                return cookie;
            }
        }
        return null;
    }
}
